﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Configuration;

namespace BussModel
{
    /// <summary>
    /// Config 的摘要描述,定義網站與資料庫相關設定
    /// </summary>
    public class Configuration
    {
        #region 變數宣告
        private static Configuration instance = null;
        private string dbConntionString = WebConfigurationManager.ConnectionStrings["TwniceFoodConnectionString"].ToString();
        #endregion

        #region Public Properites
        /// <summary>
        /// Singletion instance
        /// </summary>
        public static Configuration Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new Configuration();
                }
                return instance;
            }
        } // Instance


        /// <summary>
        /// 資料庫連接字串
        /// </summary>
        public string DBConntionString
        {
            get
            {
                return dbConntionString;
            }

        } // DBConntionString
        #endregion

        #region Public Methods
        /// <summary>
        /// 建構子
        /// </summary>
        public Configuration()
        {
            //
            // TODO: 在此加入建構函式的程式碼
            //

        } // Configuration
        #endregion
    }
}